﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace IronBrokers.InformationBroker.Helpers
{
    public static class PasswordHelper
    {
        public static string SH1(String plaintext)
        {
            Encoding enc = Encoding.UTF8;
            byte[] buffer = enc.GetBytes(plaintext);
            SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider();
            return BitConverter.ToString(cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "");
        }
    }
}
